<div class="list-client">

    <div class="button-new">
    <?php
    echo CHtml::link('<i class="icon-white icon-plus-sign"></i> '.Yii::t('app', 'Add new'), array('matter/add'), array('class' => 'btn btn-success'));
    ?>
    </div>
    <div id="ajaxmessagetxt">
    <?php
    $flashMessages = Yii::app()->user->getFlashes();
    if ($flashMessages) {
        foreach($flashMessages as $key => $message) {
            echo '<div class="alert alert-' . $key . ' fade in"><button type="button" class="close" data-dismiss="alert">×</button>' . $message . "</div>\n";
        }
    }
    ?>
    </div>

    <?php
//    $this->widget('zii.widgets.grid.CGridView', array(
    $this->widget('bootstrap.widgets.TbGridView', array(
        'id'=> 'matter',
        'dataProvider'=>$model->search(),
        'filter' => $model,
        'enableSorting' => false,
        'type' => 'striped',
        'columns'=>array(
            'id_matter',
            'name',
            'code',
            'note',
            array(
                'class'=>'bootstrap.widgets.TbButtonColumn',
                'template' => ' {update} {delete}',
                'htmlOptions' => array('width'=>'150', 'align'=>'center'),
                'afterDelete'=>'function(link,success,data){ if(success) $("#ajaxmessagetxt").html(data); }',
            ),
        ),
    ));
    ?>
</div>